import 'package:car_map/page/res/gaps.dart';
import 'package:car_map/page/res/styles.dart';
import 'package:car_map/page/squarepage/coffee_shop_page/widget_coffee_swiper.dart';
import 'package:car_map/page/squarepage/hospital_page/widget_doctor.dart';
import 'package:car_map/page/squarepage/hospital_page/widget_features_item.dart';
import 'package:car_map/widget/widget_search_textfield.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'widget_hospital_list.dart';
import 'widget_hospital_moduletitlt.dart';

///医院
class HospitalPage extends StatefulWidget {
  @override
  _hospitalState createState() => _hospitalState();
}

class _hospitalState extends State<HospitalPage> {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Colors.teal[400],
        title: getAppbar(),
      ),
      body: Container(
        padding: EdgeInsets.only(top: 5.0, bottom: 10.0),
        child: ListView(
          children: <Widget>[
            WidgetCoffeeSwiper(
              pathUrl:
                  'http://5b0988e595225.cdn.sohucs.com/q_70,c_zoom,w_640/images/20180121/7723b4b33a5d490782490d230002e1a3.jpeg',
            ),
            WidgetFeaturesItem(),
            Gaps.vGap10,
            WidgetHospitalModelTitle(
              title: '名医推荐',
            ),
            Gaps.vGap10,
            WidgetDoctor(),
            Gaps.vGap10,
            WidgetHospitalModelTitle(
              title: '医院推荐',
            ),
            Gaps.vGap10,
            WidgetHospitalList()
          ],
        ),
      ),
    );
  }

  Widget getAppbar() {
    return Row(
      mainAxisAlignment: MainAxisAlignment.spaceBetween,
      children: <Widget>[
        Container(
          width: ScreenUtil().setWidth(450.0),
          child: WidgetSearchTextField(),
        ),
        Row(
          children: <Widget>[
            Text(
              '西安',
              style: TextStyles.textSize16,
            ),
            Icon(
              Icons.unfold_more,
              color: Colors.white,
            )
          ],
        ),
      ],
    );
  }
}
